package com.wkbb.common.enums;

/**
 * @author yangdaofang
 * 创建时间：2019-09-25 11:12
 */
public enum AttTypeEnum {
    //考勤类型
    MAIN_ATT_TYPE(0,"主考勤"),
    ASSIST_ATT_TYPE(1,"辅考勤");

    private Integer code;
    private String desc;

    AttTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // 普通方法
    public static String getDesc(short code) {
        for (AttTypeEnum c : AttTypeEnum.values()) {
            if (c.getCode() == code) {
                return c.desc;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
